package com.zhbit.action;

import com.opensymphony.xwork2.ActionSupport;
import com.zhbit.Service.LeaveService;
import com.zhbit.table.Leave;

public class InsertleaveAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private LeaveService lss;
	private int id;
	private Leave leave;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public Leave getLeave() {
		return leave;
	}
	public void setLeave(Leave leave) {
		this.leave = leave;
	}
	/**
	 * @return the lss
	 */
	public LeaveService getLss() {
		return lss;
	}
	/**
	 * @param lss the lss to set
	 */
	public void setLss(LeaveService lss) {
		this.lss = lss;
	}
	public String execute() throws Exception {
		  leave.setPersonid(id);
		 lss.addleave(leave);
	       return SUCCESS;
	}
}
